import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "Materials")
public class Material {
	@Id
	@Column(name= "material_id")
	private Integer material_id;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "exam_id")
	private Exam exam;
	
	@Column(name= "name")
	private String material_name;
	
	@Column(name= "path")
	private String material_path;
	
	//getters
	
	public Integer getId(){return this.material_id;}
	
	public Exam getExam(){return this.exam;}
	
	public String getName(){return this.material_name;}
	
	public String getPath(){return this.material_path;}
	
	//setters
	
	public void setId(Integer id) {this.material_id=id;}
	
	public void setExam(Exam exam) {this.exam = exam;}
	
	public void setName(String name) {this.material_name = name;}
	
	public void setPath(String path) {this.material_path = path;}
}
